<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
	<meta charset="utf-8" />
	<title>{$Think.lang.art_page_title} - {$Think.lang.cfg_website}</title>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<!-- BEGIN GLOBAL MANDATORY STYLES -->
	<link href="{$NOW_THEME_URL}/Assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/plugins/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style-metro.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="{$NOW_THEME_URL}/Assets/css/themes/{:session('skin')}.css" rel="stylesheet" type="text/css" id="style_color"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN PAGE LEVEL STYLES -->
	<link rel="stylesheet" href="{$NOW_THEME_URL}/Assets/plugins/data-tables/DT_bootstrap.css" />
	<!-- END PAGE LEVEL STYLES -->
	<link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
	<!-- BEGIN HEADER -->
	<include file="Public:header" />
	<!-- END HEADER -->
	<!-- BEGIN CONTAINER -->
	<div class="page-container">
		<!-- BEGIN SIDEBAR -->
		<div class="page-sidebar nav-collapse collapse">
			<!-- BEGIN SIDEBAR MENU -->        
			<ul class="page-sidebar-menu">
            	<li>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
					<div class="sidebar-toggler hidden-phone"></div>
					<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
				</li>
                {$menu_tree}
            </ul>
			<!-- END SIDEBAR MENU -->
		</div>
		<!-- END SIDEBAR -->
		<!-- BEGIN PAGE -->
		<div class="page-content">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div id="portlet-config" class="modal hide">
				<div class="modal-header">
					<button data-dismiss="modal" class="close" type="button"></button>
					<h3>portlet Settings</h3>
				</div>
				<div class="modal-body">
					<p>Here will be a configuration form</p>
				</div>
			</div>
			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- BEGIN PAGE CONTAINER-->        
			<div class="container-fluid">
				<!-- BEGIN PAGE HEADER-->
				<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN PAGE TITLE & BREADCRUMB-->
						<div class="clear">&nbsp;</div>
						<ul class="breadcrumb">
							<li>
								<i class="icon-home"></i>
								<a href="__APP__">{$Think.lang.cfg_page_home}</a> 
								<span class="icon-angle-right"></span>
							</li>
							<li>
								<a href="#">{$Think.lang.art_page_title}</a> 
								<span class="icon-angle-right"></span>
						  </li>
						</ul>
						<!-- END PAGE TITLE & BREADCRUMB-->
					</div>
				</div>
				<!-- END PAGE HEADER-->
				<!-- BEGIN PAGE CONTENT-->
				<div class="row-fluid">
					<div class="span12">
						<!-- BEGIN EXAMPLE TABLE PORTLET-->
						<div class="portlet box light-grey">
							<div class="portlet-title">
								<div class="caption"><i class="icon-reorder"></i>{$Think.lang.art_page_title}</div>
								<div class="actions">
                                    <a class="btn green" id="batchAudit"><i class="icon-check">
                                    </i>{$Think.lang.art_form_ele_edits}</a>
									<a class="btn red" id="batchDelete"><i class="icon-remove">
                                    </i>{$Think.lang.cfg_list_itf_btn_deletes}</a>
								</div>
							</div>
							<div class="portlet-body flip-scroll">
								<div class="row-fluid">
                                  <div class="span10">
                                    <div class="dataTables_filter" id="userList_filter">
                                    	
                                    	<select name="ischecked" class="m-wrap medium">
                                        <option value="">请选择审核类型</option>
                                        <option value="1">{$Think.lang.art_form_ele_edit1}</option>
                                        <option value="2">{$Think.lang.art_form_ele_edit2}</option>
                                        </select>
                                    
                                        <input type="text" class="m-wrap medium" name="keywords" 
                                         placeholder="{$Think.lang.cfg_list_itf_search_tis}" />
                                        <button id="btn_search" class="btn black">
										{$Think.lang.cfg_list_itf_search} <i class="icon-search"></i>
										</button>
                                    </div>
                                  </div>
                                  
                                </div>
								<table class="table table-striped table-bordered table-hover table-condensed flip-content" 
                                 id="userList">
									
								</table>
                                
                                <div class="row-fluid">
                                  <div class="span6">
                                    <div class="dataTables_info" id="pageRecord">
                                    </div>
                                  </div>
                                  <div class="span6">
                                    <div class="dataTables_paginate paging_bootstrap pagination">
                                      <ul id="pagePaginate">
                                        
                                      </ul>
                                    </div>
                                  </div>
                                </div>
							</div>
						</div>
						<!-- END EXAMPLE TABLE PORTLET-->
					</div>
				</div>				
				<!-- END PAGE CONTENT-->
			</div>
			<!-- END PAGE CONTAINER-->
		</div>
		<!-- END PAGE -->
	</div>
	<!-- END CONTAINER -->
	<!-- BEGIN FOOTER -->
    <include file="Public:footer" />
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->
	<script src="__PUBLIC__/Js/jquery.min.js" type="text/javascript"></script>
	<script src="{$NOW_THEME_URL}/Assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>   
	<script src="{$NOW_THEME_URL}/Assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<!--[if lt IE 9]>
	<script src="{$NOW_THEME_URL}/Assets/plugins/excanvas.min.js"></script>
	<script src="{$NOW_THEME_URL}/Assets/plugins/respond.min.js"></script>  
	<![endif]-->  
	<script src="{$NOW_THEME_URL}/Assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<!-- END CORE PLUGINS -->
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/data-tables/jquery.dataTables.js"></script>
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/data-tables/DT_bootstrap.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/artdialog/jquery.artdialog.js?skin=bootstrap"></script>
	<script type="text/javascript" src="{$NOW_THEME_URL}/Assets/plugins/artdialog/plugins/iframeTools.js"></script>
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="{$NOW_THEME_URL}/Assets/scripts/app.js"></script>
	<script src="{$NOW_THEME_URL}/Assets/scripts/common/commonList.js"></script>     
	<script type="text/javascript">
		var ABS_URL_Theme = "{$NOW_THEME_URL}/";
		var ABS_URL_Module = "__URL__";
		var list_itf = {};
		list_itf.no_record  = '{$Think.lang.cfg_list_itf_no_record}';
		list_itf.rpp        = '{$Think.lang.cfg_list_itf_rpp}';
		list_itf.search     = '{$Think.lang.cfg_list_itf_search}';
		list_itf.search_tis = '{$Think.lang.cfg_list_itf_search_tis}';
		list_itf.recordall  = '{$Think.lang.cfg_list_itf_recordall}';
		list_itf.recordnum  = '{$Think.lang.cfg_list_itf_recordnum}';
		list_itf.papename   = '{$Think.lang.cfg_list_itf_papename}';
		list_itf.first      = '{$Think.lang.cfg_list_itf_first}';
		list_itf.last       = '{$Think.lang.cfg_list_itf_last}';
		list_itf.prev       = '{$Think.lang.cfg_list_itf_prev}';
		list_itf.next       = '{$Think.lang.cfg_list_itf_next}';
		jQuery(document).ready(function() {       
		   App.init();
		   
			var listParam = {
				listId : 'userList',
				jsonUrl : '__URL__/index',
				where : '',
				pageNum : 10,
				nowPage : 1,
				orderName : "addtime",
                orderDirection : "desc",
				colModel : [
					{
						display : 'checkbox',
						name : 'id',
						ordertable : true,
						myclass : 'center'
                    },
					{
                        display : '{$Think.lang.art_form_ele_title}',
                        name : 'title',
                        ordertable : true,
						myclass : 'left'
                    },
					{
                        display : '{$Think.lang.art_form_ele_realname}',
                        name : 'realname',
                        ordertable : true,
						myclass : 'left'
                    },
					{
                        display : '{$Think.lang.art_form_ele_phone}',
                        name : 'phone',
                        ordertable : true,
						myclass : 'left'
                    },
					{
                        display : '{$Think.lang.cfg_form_ele_addtime}',
                        name : 'addtime',
                        ordertable : true,
						myclass : 'center'
                    },
					{
                        display : '{$Think.lang.cfg_form_ele_opreate}',
                        name : 'deal',
                        ordertable : false,
						myclass : 'center'
                    }
				],
				getSearch : function(where){
					var keywords = $('input[name="keywords"]').val();
					listParam.where = '';
					if($.trim(keywords)!=''){
						listParam.where += ' AND (`title` LIKE "%'+keywords+'%" or `realname` LIKE "%'+keywords+'%" or `mobile` LIKE "%'+keywords+'%" )';
					}
					var ischecked = $('select[name="ischecked"]').val();
				
					if(ischecked){
						listParam.where += ' AND (`ischecked` ='+ischecked+')';
					}
				}
			};
			
			commonList.init(listParam);
			
			//生成手工鏈接
			$('.create_url').live('click',function(){
				var url = "{$Think.MODULE_NAME}/detail/id/";
				url = url+$(this).attr('data-id');
				art.dialog({
					title: '{$Think.lang.cfg_form_tis_handurl}',
					content: url,
					fixed:true,
					id: 'userReg',
					width:200,
					lock: true
				});
			});
			
			//删除
			$('.delAlone').live('click',function(){
				$.get('{$Think.const.__URL__}/del/id/'+$(this).attr('data-id'),function(data){
					if(data.status==0){
						art.dialog.alert(data.info);
					}else{
						commonList.init(listParam);
					}
				});
			});
			
			//审核
			$('.checkOne').live('click',function(){
				var obj = $(this);
				$.get('{$Think.const.__URL__}/audit/id/'+$(this).attr('data-id'),function(data){
					if(data.status==0){
						art.dialog.alert(data.info);
					}else{
						obj.removeClass("green");
						obj.removeClass("checkOne");
					}
				},"json");
			});
			
			//批量审核
			$('#batchAudit').live('click',function(){
				var param = '';
				$('.checkboxes').each(function(index, element) {
					if($(this).is(":checked")){
						if(param==''){
							param += $(element).val();
						}else{
							param += ','+$(element).val();
						}
					}
                });
				
				$.get(ABS_URL_Module+'/audit/id/'+param);
				commonList.init(listParam);//请求列表
			});
			
			$('select[name="ischecked"]').on("change",function(){
				$('#btn_search').trigger("click");
			});
		});
	</script>
	<!-- END JAVASCRIPTS -->   
</body>
<!-- END BODY -->
</html>